package com.taikang.t.service.security.service;

import java.util.Map;

import net.sf.ehcache.Cache;
import org.springframework.stereotype.Service;
import org.apache.log4j.Logger;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import org.springframework.security.userdetails.UserDetails;
import org.springframework.security.userdetails.UserDetailsService;
import org.springframework.security.userdetails.UsernameNotFoundException;

import com.taikang.t.service.security.SecurityManager;

@Service("securityManager")
public class SecurityManagerSupport extends HibernateDaoSupport implements UserDetailsService,SecurityManager{
	@SuppressWarnings("unused")
	private Logger log = Logger.getLogger(SecurityManagerSupport.class);
	
	@SuppressWarnings("unused")
	private Cache cache; 
	//已noUrlPrefix为前�?��url将会忽略，一般为其他应用的URl，过滤后，提高url匹配的�?�?
	@SuppressWarnings("unused")
	private String noUrlPrefix;
    
	@Autowired
    public void init(SessionFactory sessionFactory) {
        super.setSessionFactory(sessionFactory);
    }
	
	public UserDetails loadUserByUsername(String userName) throws UsernameNotFoundException, DataAccessException {
		return null;
	}
	
	
	public Map<String, String> loadUrlAuthorities() {
		return null;
    }
	

	public void setCache(Cache cache) {
		this.cache = cache;
	}

	public void setNoUrlPrefix(String noUrlPrefix) {
		this.noUrlPrefix = noUrlPrefix;
	}
	


}
